import axios from "axios";
import React, { useEffect, useState } from "react";
import { Outlet, useNavigate } from "react-router-dom";
// import { InfiniteScroll, List } from "antd-mobile";
// import { sleep } from "antd-mobile/es/utils/sleep";
export default function Home() {
	useEffect(() => {}, []);
	let navigate = useNavigate();
	// const [data, setData] = useState([]);
	// const [hasMore, setHasMore] = useState(true);
	// const [page, setPage] = useState(1);
	// async function loadMore() {
	// 	const append = await axios
	// 		.get("URL路径", {
	// 			params: {
	// 				page: page,
	// 				limit: 4,
	// 			},
	// 		})
	// 		.then(async (val) => {
	// 			await sleep(2000);
	// 			let {
	// 				data: { data },
	// 			} = val;
	// 			return data;
	// 		});
	// 	setData((val) => [...val, ...append]);
	// 	setPage(page + 1);
	// 	setHasMore(append.length > 0);
	// }

	return (
		<div>
			<p>home</p>
			{/* <List>
        {data.map((item, index) => (
          <List.Item key={index}>{item.title}</List.Item>
        ))}
      </List>
      <InfiniteScroll loadMore={loadMore} hasMore={hasMore} /> */}
		</div>
	);
}
